#include "../DataModule.h"

#define MAP_W_IN_TILES 256
#define MAP_H_IN_TILES 320

class MapModule: public DataModule {
  private:
    uint map_addrs[8];
    uint tiles[MAP_H_IN_TILES][MAP_W_IN_TILES];
    uint calcMapAddress(int y);
  public:
    const char* getName();
    const char* getCredits();

    void readFromRom(Rom& rom);
    void writeToRom(Rom& rom);
    void readFromDat(char* dirName, std::map<std::string, std::string> &fns, std::map<std::string, int> &labels);
    void writeToDat(char* dirName, std::map<std::string, std::string> &fns);
};
